<!--
 * @Descripttion: 
 * @Author: Wang Dejiang(aei)
 * @Date: 2022-07-23 00:00:59
 * @LastEditors: Wang Dejiang(aei)
 * @LastEditTime: 2022-07-23 00:25:28
-->
<template>
  <div style="display: flex; justify-content: center">
    <div id="main"></div>
  </div>
</template>

<script>
export default {
  name: 'Test2',
  mounted() {
    const element = document.getElementById('main')
    const myChart = this.$echarts.init(element)
    let option = {
      title: { text: 'test2' },
      xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
      },
      yAxis: {
        type: 'value'
      },
      legend: {
        data: ['test']
      },
      series: [
        {
          name: 'test',
          data: [150, 230, 224, 218, 135, 147, 260],
          type: 'line',
          smooth: true,
          areaStyle: {}
        }
      ]
    }

    myChart.setOption(option)
  }
}
</script>

<style scoped>
#main {
  height: 500px;
  width: 500px;
}
</style>
